﻿Imports App_Code
Imports IUiBuildingBlock = App_Code.IUiBuildingBlock
Partial Class Admin_PreviewUC
    Inherits System.Web.UI.Page
    Implements IUiBuildingBlock

    Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
        Dim uc As String = Request.QueryString("Src")
        ucName.Text = uc

        Dim c As IUiBuildingBlock = CType(LoadControl(ResolveUrl(ConfigurationSettings.AppSettings("buildingBlockPath") & uc)), IUiBuildingBlock)

        If Request.QueryString("Question") Is Nothing OrElse Request.QueryString("Question").Trim().Length = 0 Then
            c.QuestionText = "Your question's text will go here..."
        Else
            c.QuestionText = Request.QueryString("Question")
        End If

        ucPreview.Controls.Add(CType(c, Control))
    End Sub

    Public ReadOnly Property DataType() As DQDataTypes Implements IUiBuildingBlock.DataType
        Get
            Throw New NotImplementedException()
        End Get
    End Property

    Public Property QuestionId() As Integer Implements IUiBuildingBlock.QuestionId
        Get
            Throw New NotImplementedException()
        End Get
        Set (ByVal value As Integer)
            Throw New NotImplementedException()
        End Set
    End Property

    Public Property QuestionText() As String Implements IUiBuildingBlock.QuestionText
        Get
            Throw New NotImplementedException()
        End Get
        Set (ByVal value As String)
            Throw New NotImplementedException()
        End Set
    End Property

    Public Property Answer() As Object Implements IUiBuildingBlock.Answer
        Get
            Throw New NotImplementedException()
        End Get
        Set (ByVal value As Object)
            Throw New NotImplementedException()
        End Set
    End Property
End Class
